using TableTools.Shared;

namespace TableTools.Models;

public class ConvertToClassSettings
{
    /// <summary>
    /// 字段名称位置索引
    /// </summary>
    public int FieldNameIndex { get; set; } = 0;
    
    /// <summary>
    /// 字段类型位置索引
    /// </summary>
    public int FieldTypeIndex { get; set; } = 1;
    
    /// <summary>
    /// 字段描述位置索引
    /// </summary>
    public int FieldDescIndex { get; set; } = 2;
    
    /// <summary>
    /// 字段实例值位置索引
    /// </summary>
    public int FieldValueIndex { get; set; } = -1;
    
    /// <summary>
    /// 字段约束位置索引
    /// </summary>
    public int FieldCheckIndex { get; set; } = -1;

    /// <summary>
    /// 默认System.Text.Json的特性
    /// </summary>
    public FieldAttributeType Type { get; set; } = FieldAttributeType.Json;

    /// <summary>
    /// 是否用table转换
    /// </summary>
    public bool IsUseTable { get; set; } = true;
    
    /// <summary>
    /// 是否程序集内部访问
    /// </summary>
    public bool IsInternal { get; set; } = true;
}